#!/usr/bin/perl 
 
foreach(@ARGV) {
# Regex Match lower case and upper case character "p" ( ignores alphabetic case )
	if (m/p/i) {$p1++;}
# Regex Match lower case character "p" only
	if (m/p/) {$p2++;}
# Regex Match two characters "ex" and ignore alphabetic case
	if (m/ex/i) {$ex++;}
}
print "p1=$p1\np2=$p2\nex=$ex\n"; 